<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>边框样式</title>
    <style>
        #d1{
            /*设置所有边框*/
            /*border: 5px solid black;*/

            /*设置上边框*/
            border-top: 5px solid black;  /*黑色实线*/

            /*设置左边框*/
            border-left: 5px double red;  /*红色双实线*/

            /*设置右边框*/
            border-right: 5px dotted blue;  /*蓝色圆点*/

            /*设置下边框*/
            border-bottom: 5px dashed pink;  /*粉色虚线*/

            width: 150px;
            height: 150px;
        }

        #d2{
            border: 5px solid red;
            width: 150px;
            height: 150px;
        }
    </style>
</head>
<body>
    <div id="d1"></div><br/>
    <div id="d2"></div>
</body>
</html>